package thread;

class Point{
    public Point() {

    }
}
class PointFactory{
    public static Point makePointbyXY(double x, double y) {
        Point p = new Point();
        return p;
    }
    public static Point makePointbyAR(double a, double r) {
        Point p = new Point();
        return p;
    }
}
public class Demo24 {
    public static void main(String[] args) {
        // 编写不同名称的静态方法，将构造方法封装在静态方法中，直接调用静态方法进行初始化
        Point p = PointFactory.makePointbyAR(10, 20);
    }
}
